import request from '@/utils/request';

/**
 * 新增
 * @returns
 */

export const add = (data) =>
  request({
    url: '/api/add', //模拟路径
    method: 'post',
    data
  });

/**
 * 修改
 * @param {*} params
 * @returns
 */

export const setUpdate = (data) =>
  request({
    url: '/api/update', //模拟路径
    method: 'post',
    data
  });

/**
 * 查询
 * @param {*} params
 * @returns
 */

export const getSearch = (params) =>
  request({
    url: '/api/seach', //模拟路径
    method: 'get',
    params
  });

/**
 * 详情
 * @param {*} params
 * @returns
 */

export const getInfo = (id) =>
  request({
    url: `/api/seach/${id}`, //模拟路径
    method: 'get'
  });

/**
 * 删除
 * @param {*} params
 * @returns
 */

export const setDelete = (id) =>
  request({
    url: `/api/delete/${id}`, //模拟路径
    method: 'get'
  });
